<layout name="layout" />
<link rel="stylesheet" href="/Css/ranking.css" type="text/css">
<div class="pageheader notab">
	<h1 class="pagetitle">
		<a href="/" class="linkWay">首页/我的卡位策略</a>
		&nbsp;<span class="divider">»</span>&nbsp;
		<a href="#" class="currentWay">我的卡位策略</a>
	</h1>
</div>
<div clear="all"></div>
<div id="contentwrapper" class="contentwrapper">
	<div id="maincontent">
		<div style="padding-right:10px;width:100%">
			<table cellpadding="0" cellspacing="0" border="0" class="ranking_list metrotable datatable">
				<thead>
					<tr>
						<th width="5%" class="head1">ID</th>
						<th class="head0">卡位测略</th>
						<th width="10%" class="head1">状态</th>
						<th width="10%" class="head0">卡位轮次</th>
						<th width="30%" class="head1">卡位区间</th>
						<th width="15%" class="head0">上一次卡位时间</th>
						<th width="20%" class="head1">操作</th>
					</tr>
				</thead>
				<tbody id="con-list-tr">
					<tr class="no_ranking" style="display: none;">
						<td colspan="6">暂无卡位策略</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>

<script id="template_rankings" type="text/html">
	<%for(var i=0;i<data.length;i++){%>
	<tr data-task-id="<%=data[i].tactics_id%>">
		<td><%=data[i].tactics_id%></td>
		<td>
			<a href="/ranking/ranking_detail?tactics_id=<%=data[i].tactics_id%>"><%=data[i].tactics_name%></a>
		</td>
		<td class="status_name"><%=data[i].status_name%></td>
		<td><%=data[i].executions%></td>
		<td>
			<%=data[i].range%>
		</td>
		<td><%=data[i].tactics_modified_time%></td>
		<td>
			<a href="/ranking/ranking_detail?tactics_id=<%=data[i].tactics_id%>">详情</a>&nbsp;
			<a href="javascript:;" data-tactics_id="<%=data[i].tactics_id%>" data-status="<%=data[i].tactics_status%>" class="status"><%=data[i].status_action%></a>&nbsp;
			<a href="/shortcut/ranking_rules?tactics_id=<%=data[i].tactics_id%>">编辑</a>&nbsp;
			<a href="javascript:;" class="delete" data-tactics_id="<%=data[i].tactics_id%>">删除</a>
		</td>
	</tr>
	<%}%>
</script>

<script type="text/javascript">
	var user_id = {$current_user_id};
	$(document).ready(function(){
		var $container = $('.contentwrapper');
		ranking.list($container, {
			user_id: user_id
		}).init();
	});
</script>